<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <textarea id="one" cols="30" rows="10"></textarea>
    <button id="btn">过滤</button>
    <textarea id="value" cols="30" rows="10"></textarea>
    <script>
    var txt=document.getElementById("one");
    var btn=document.getElementById("btn");
    var filter=document.getElementById("value");
    var reg=/(京东)|(淘宝)/g;
    btn.onclick=function(){
        var txtValue=txt.value;
        var newTxt=txtValue.replace(reg,"*");
        filter.value=newTxt;
    }
    </script>
</body>
</html>